home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 008a / tbscan30.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1991-11-17  |  4KB  |  96 lines

  1. @echo off
  2. echo off
  3.  
  4. if '%1'=='' goto help
  5. if not exist TbScan.Pgm goto err1
  6.  
  7. echo                         INSTALLATION TBSCAN
  8. echo ───────────────────────────────────────────────────────────────────────
  9. echo            TbScan is no longer a COM file but an EXE file!
  10. echo          If there is a COM and a EXE file with the same name,
  11. echo                       DOS executes the COM file.
  12. echo          To make sure that TbScan.EXE file will be executed,
  13. echo                all TbScan.COM files have to be deleted!
  14. echo          This installation batch file deletes the TbScan.COM
  15. echo              file in the target directory automatically.
  16. echo      However, if there are other TbScan.COM files on your system,
  17. echo                   you should delete them manually.
  18.  
  19. rem  If a file with urgent information exists print it now
  20. if exist Readme.Now type Readme.Now
  21. echo ───────────────────────────────────────────────────────────────────────
  22.  
  23. rem  TbScan.Exe should not exist in current directory
  24. if exist TbScan.Exe del TbScan.Exe >nul
  25. rem  Make directory if it does not exist
  26. if not exist %1\nul md %1
  27. rem  Directory should now exist
  28. if not exist %1\nul goto err2
  29. rem  Delete TbScan.COM if it is there
  30. if exist %1\TbScan.Com del %1\TbScan.Com >nul
  31. rem  Install the new TbScan.Exe file
  32. copy TbScan.Pgm %1\TbScan.Exe >nul
  33. rem  The file should have been copied
  34. if not exist %1\TbScan.Exe goto err3
  35. rem  If the directory specified is the current directory we are ready
  36. if exist TbScan.Exe goto ready
  37. rem  Copy the remaining files to the target directory
  38. if exist *.avr copy *.avr %1\*.avr >nul
  39. if exist *.dat copy *.dat %1\*.dat >nul
  40. if exist TbScan.Hlp copy TbScan.Hlp %1\TbScan.Hlp >nul
  41. if exist TbScan.Msg copy TbScan.Msg %1\TbScan.Msg >nul
  42. if exist TbScan.Doc copy TbScan.Doc %1\TbScan.Doc >nul
  43. if exist TbScan.Key copy TbScan.Key %1\TbScan.Key >nul
  44. if exist Report.Doc copy Report.Doc %1\Report.Doc >nul
  45. if not exist Tbs.Bat goto label1
  46. rem  If there is already a Tbs.Bat in the target directory do not destroy it
  47. if not exist %1\Tbs.Bat copy Tbs.Bat %1\Tbs.Bat >nul
  48. :label1
  49. rem  If we are installing the evaluation version copy the Register.Doc file too
  50. if not exist TbScan.Key copy Register.Doc %1\Register.Doc >nul
  51. if not exist TbScan.New goto ready
  52. rem  If the target directory contains an old TbScan.NEW file update it
  53. if exist %1\TbScan.New copy TbScan.New %1\TbScan.New >nul
  54. :ready
  55. echo ───────────────────────────────────────────────────────────────────────
  56. echo TbScan is now installed. It is recommended to print or read the file
  57. echo TbScan.Doc. To run TbScan type "%1\TbScan C:\".
  58. echo Type "%1\TbScan -help" to get a help screen.
  59. if not exist InstallX.Bat goto end
  60. echo ───────────────────────────────────────────────────────────────────────
  61. echo ───────────────────────────────────────────────────────────────────────
  62. echo To install TbScanX too, you should run the batch file "InstallX".
  63. goto end
  64.  
  65. :err1
  66. echo ───────────────────────────────────────────────────────────────────────
  67. echo Error: TbScan.Pgm not found in current directory.
  68. echo        Change to the drive and directory containing this file.
  69. goto end
  70.  
  71. :err2
  72. echo ───────────────────────────────────────────────────────────────────────
  73. echo Error: Can not create directory %1\
  74. echo        Invalid path or write protected disk.
  75. echo        You should NOT specify a trailing backslash (\).
  76. goto end
  77.  
  78. :err3
  79. echo ───────────────────────────────────────────────────────────────────────
  80. echo Error: Can not copy TbScan.Pgm to %1\TbScan.Exe
  81. echo        Disk probably full or write protected.
  82. goto end
  83.  
  84. :help
  85. echo ───────────────────────────────────────────────────────────────────────
  86. echo This installation batch file installs the TbScan virus detector.
  87. echo You have to specify the directory where TbScan has to be installed.
  88. echo If the directory does not exist it will be created.
  89. echo Do NOT specify a trailing backslash (\).
  90. echo Examples:
  91. echo                    install c:
  92. echo                    install d:\tb
  93. :end
  94. echo ───────────────────────────────────────────────────────────────────────
  95.  
  96.